<?php
class CL_Functions {
    
	private $db;
	function __construct() {
		require_once 'DB_Functions.php';
        $this->db = new DB_Functions();
    }
	public function regEmail($name, $email, $created, $activation){
		$subject = "Welcome to Zapp!";
		$message = "Hello $name! \n\nSomeone (hopefully you!) created an account with this email address.\n\nThank you for installing our application, we take great pride in providing a reliable service the to community, if at any time you find that the application isn't functioning as you think it should, please contact support@zappsecurity.com and we will try our best to work through the issue.\n\nYour account requires activation, to active it please visit the following link.
		\n\n\http://zappsecurity.com/test/backend/index.php?tag=activate&uid=$activation";
		$from = "support@zappsecurity.com";
		$headers = "From:" . $from;
		mail($email,$subject,$message,$headers);
	}
	
	public function resendActivation($uid){
		$user = $this->db->getUser($uid);
		if ($user != false){
			$name = $user['name'];
			$activation = $user['unique_id'];
			$email = $user['email'];
			$subject = "Welcome to Zapp!";
			$message = "Hello $name! \n\nSomeone (hopefully you!) created an account with this email address.\n\nThank you for installing our application, we take great pride in providing a reliable service the to community, if at any time you find that the application isn't functioning as you think it should, please contact support@zappsecurity.com and we will try our best to work through the issue.\n\nYour account requires activation, to active it please visit the following link.
			\n\n\http://zappsecurity.com/test/backend/index.php?tag=activate&uid=$activation";
			$from = "support@zappsecurity.com";
			$headers = "From:" . $from;
			mail($email,$subject,$message,$headers);
			return true;
		} else{
			return false;
		}
    }
		
}

?>